const net = require("net")

const server = new.createServer()

server.listen(9876, "localhost")

server.on('connection', (stream) => {
    console.log('someone connected!');
    stream.on("data", (buffer) => {
        console.log('buffer', buffer.toString());
    })
 });
 